CC=/opt/toolchains/atom32-eglibc-std-2.12-gcc-4.5.1-binutils-2.20.1/bin/i686-fbx-linux-gnu-gcc
CXX=/opt/toolchains/atom32-eglibc-std-2.12-gcc-4.5.1-binutils-2.20.1/bin/i686-fbx-linux-gnu-g++

FREEBOX_SDK_PATH=/opt/toolchains/atom32-eglibc-std-2.12-gcc-4.5.1-binutils-2.20.1

INCLUDES=-I$(FREEBOX_SDK_PATH)/i686-fbx-linux-gnu/include \
		 	-I$(FREEBOX_SDK_PATH)/../gameloft_header/include \
			-I$(FREEBOX_SDK_PATH)/i686-fbx-linux-gnu/sys-root/usr/include

CFLAGS=-O2 -mfpmath=sse
CXXFLAGS=-O2 -mfpmath=sse

AM_LDFLAGS=-L$(FREEBOX_SDK_PATH)/i686-fbx-linux-gnu/lib \
			-L$(FREEBOX_SDK_PATH)/../gameloft_header/lib \
			-L$(FREEBOX_SDK_PATH)/lib -lSDL \
			-lGLESv1_CM -lcurl -lpthread -lssl -lcrypto -lopenal -lz

test : main.o
	$(CXX) $(CXXFLAGS) $(AM_LDFLAGS) main.o -o test

main.o : main.cpp
	$(CXX) $(CXXFLAGS) $(INCLUDES) -c main.cpp -o main.o

#macaddr.o : macaddr.cpp
#	$(CXX) $(CXXFLAGS) $(INCLUDES) -c macaddr.cpp -o macaddr.o

clean :
	@rm -f *.o test
	@echo all cleaned

.PHONY : clean
